//
//  UIImage+Extension.m
//  iBook
//
//  Created by wangjing on 14/12/4.
//  Copyright (c) 2014年 wikiflyer. All rights reserved.
//

#import "UIImage+Extension.h"

@implementation UIImage (Extension)

+(UIImage *)imageWithName:(NSString *)name{
    UIImage *image = nil;
    //
    //处理IOS7的情况
    //
    if (image == nil) {
        image = [UIImage imageNamed:name];
    }
    return image;
}
+(UIImage *)resizedImage:(NSString *)name{
    UIImage *image = [[UIImage alloc]init];
    //一长度的一半，高度的一半为中心 进行拉伸
    return [image stretchableImageWithLeftCapWidth:image.size.width*0.5 topCapHeight:image.size.height*0.5];
}

@end
